public class Test {
    public static void main(String[] args) {
        //从大到小创建对象
        OrganizationComponent university = new University("野鸡大学", "中国的大学");
        //学院
        OrganizationComponent department1 = new Department("计算机学院", "码农的学院");
        OrganizationComponent department2 = new Department("电子信息学院", "码农的兄弟学院");
        university.add(department1);
        university.add(department2);
        //专业
        department1.add(new Major("计算机","码农"));
        department1.add(new Major("软件工程","也是码农"));
        department2.add(new Major("通信工程","通信比较难"));
        department2.add(new Major("自动化","自动化也难"));

        university.print();
    }
}
